package com.apps.hello.clients;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * service-hello 调用 service-msg实现 ribbon负载均衡
 */
@FeignClient(value = "service-msg",fallback = MsgServiceHystrix.class)
public interface MsgService {

  @RequestMapping(value = "/list",method = RequestMethod.GET)
  String listMsg(@RequestParam(value = "name") String name);


  @RequestMapping(value = "/info",method = RequestMethod.GET)
  String infoMsg(@RequestParam(value = "name") String name);



}
